<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Requests;

use Qiniu\Auth;
use Qiniu\Storage\UploadManager;

  
class FileController extends Controller
{
	public function uptoken(){

		$accessKey = env('ACCESS_KEY');
		$secretKey = env('SECRET_KEY');
		$bucket = env('BUCKET_NAME');
		$auth = new Auth($accessKey, $secretKey);
		// 生成上传Token
		$token = $auth->uploadToken($bucket);
		return $token;
	}
}
